﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Admin_DevMan_Query.aspx.cs" Inherits="Admin_DevMan_Query" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <link rel="stylesheet" href="./css/gridview.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.min.js"></script>
    <script src="./lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <script type="text/javascript" src="./js/cookie.js"></script>
    <title></title>
      <style>
        .all{
            width:95%;
            margin-left:2.5%
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div class="all">
                <div class="layui-container" style="margin-top:10px;margin-bottom:10px;">
                    <table>
                    <tr>
                        <td>查询</td>
                        <td>
                            <div style="font-size: small">
                                (请输入相关信息以提升查询准确度，<b><font style="color:red">非必填</font></b>)
                            </div>
                        </td>
                        <td>：</td>
                    </tr>
                </table>
                </div>
               
            <div class="layui-container">
                <div class="layui-row" style="margin-top:10px;margin-bottom:10px;">
                    <div class="layui-col-md4" style="margin-right:10px">
                        <asp:TextBox ID="Fnum" runat="server"  class="layui-input" placeholder="请输入设备编号"></asp:TextBox>
                    </div>
                    <div class="layui-col-md4" style="margin-left:10px">
                        <asp:TextBox ID="FName" runat="server" class="layui-input" placeholder="请输入仪器名称"></asp:TextBox>
                    </div>
                    <div class="layui-col-md4">
                        
                    </div>
                </div>
                <div class="layui-row" style="margin-top:10px;margin-bottom:10px;">
                    <div class="layui-col-md4" style="margin-right:10px">
                        <asp:TextBox ID="FDanwei" runat="server" class="layui-input" placeholder="请输入所属单位"></asp:TextBox>
                    </div>
                    <div class="layui-col-md4" style="margin-left:10px">
                        <asp:TextBox ID="FDutyName" runat="server" class="layui-input" placeholder="请输入责任人"></asp:TextBox>
                    </div>
                    <div class="layui-col-md4">
                       
                    </div>
                </div>
                <div class="layui-row" style="margin-top:10px;margin-bottom:10px;">
                    <div class="layui-col-md4" style="margin-right:10px"> 
                        <asp:TextBox ID="FCondition" runat="server" class="layui-input" placeholder="请输入设备状态"></asp:TextBox>
                    </div>
                    <div class="layui-col-md4" style="margin-left:10px">
                        <asp:Button ID="Button1" runat="server" text='查找' class="layui-btn layui-btn-fluid" OnClick="Button1_Click"></asp:Button>
                    </div>
                    <div class="layui-col-md4">
                        
                    </div>
                </div>
            </div>
             <asp:Label ID="Label1" runat="server" Text=""></asp:Label>   
                 
      

<%--        <script type="text/javascript">
            function getTableContent(node) {
                // 按钮的父节点的父节点是tr。
                var pronum = "";
                var tr1 = node.parentNode.parentNode;
                var rownum = tr1.rowIndex;
                pronum = tr1.cells[0].innerText;
                if (window.confirm('你确定要删除该设备信息吗？')) {
                    //alert("确定");                
                    pronum = tr1.cells[0].innerText;
                    document.getElementById("HiddenField1").Value = pronum;
                   
                    alert(pronum);
                    var table = document.getElementById("table");
                    table.deleteRow(rownum);
                    return true;
                } else {
                    //alert("取消");
                    return false;
                }

            }
</script>--%>
          
<%--                
            <div class="layui-container">
                <asp:GridView ID="GridView1" Class="GridView" runat="server" AutoGenerateColumns="False" DataKeyNames="pro_num" HorizontalAlign="Left" Width="819px">
                    <Columns>
                        <asp:BoundField DataField="pro_num" HeaderText="仪器编号" ReadOnly="True" SortExpression="pro_num" />
                        <asp:BoundField DataField="pro_name" HeaderText="仪器名称" SortExpression="pro_name" />
                        <asp:BoundField DataField="pro_danwei" HeaderText="所属单位" SortExpression="pro_danwei" />
                        <asp:BoundField DataField="auditor" HeaderText="责任人" SortExpression="auditor" />
                        <asp:BoundField DataField="pro_location" HeaderText="放置位置" SortExpression="pro_location" />
                        <asp:BoundField DataField="buydate" HeaderText="购置日期" SortExpression="buydate" />
                        <asp:BoundField DataField="condition" HeaderText="仪器状况" SortExpression="condition" />
                        <asp:HyperLinkField DataNavigateUrlFields="pro_num" DataNavigateUrlFormatString="Admin_DevMan_Details.aspx?id={0}" HeaderText="详细信息" Text="查看" />
                    </Columns>
                </asp:GridView>
            </div>
            <p>
                &nbsp;</p>
            <p>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringProManage %>" SelectCommand="SELECT [pro_num], [pro_name], [pro_danwei], [auditor], [pro_location], [buydate], [condition] FROM [Products] WHERE (([pro_name] LIKE '%' + @pro_name + '%') AND ([pro_danwei] LIKE '%' + @pro_danwei + '%') AND ([auditor] LIKE '%' + @auditor + '%') AND ([pro_num] LIKE '%' + @pro_num + '%'))">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="FName" DefaultValue="%" Name="pro_name" PropertyName="Text" Type="String" />
                        <asp:ControlParameter ControlID="FDanwei" DefaultValue="%" Name="pro_danwei" PropertyName="Text" Type="String" />
                        <asp:ControlParameter ControlID="FDutyName" DefaultValue="%" Name="auditor" PropertyName="Text" Type="String" />
                        <asp:ControlParameter ControlID="Fnum" DefaultValue="%" Name="pro_num" PropertyName="Text" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </p>--%>
        </div>
    </form>
</body>
</html>
